#include<vector>
#include<list>
#include<deque>
#include<sstream>

class 

vector<string> svec;




ifstream& open_file(ifstream &in,const string &file)
{
  in.close();
  in.clear();
  in.open(file.c_str());
  return in;
}
void  read_file(std::ifstream &is){
   {store_file(is);build_map();}
   void store_file(std::ifstream&){
     string textline;
     while(getline(is,textline))
         svec.push_back(textline);
   }
   istringstream stream(line);
   while(stream>> word){
     //do pre-word processing
   }
   void build_map(){
     for(line_no line_num = 0;
	 line_num !=lines_of_text.size();
	 ++line_num)
       {
	 //use line to read the text a word at a time
	 istringstream line(lines_of_text[line_num]);
	 string word;
	 while(line >> word)
	   word_map[word].insert(line_num);

       }
   }

map or set

  set<log_query::line_no>
  run_query(const string &query_word) const
  {
    map<string,set<line_no>>::const_iterator
      loc = word_map.find(query_word);
    if(loc ==word_map.end())
      return set<line_no>();
    else
      return loc->second;
  }
 string text_line(line_no line) const
 {
   if(line < line_of_text.size())
     return lines_of_text[line];
   throw std::out_of_range("line number out of range");
 }











  

